//home组件的接口

import request from "./http";
// http://192.168.100.59:3000/banner?type=3

// 获取轮播图数据
export function getBanner(){
    return request({
        url:'/banner?type=3',
        method:"get"
    })
}

// 获取推荐歌单接口

export function getPersonalized(){
    return request({
        url:'/personalized?limit=9',
        method:"get"
    })
}

//最新音乐 '/personalized/newsong'

export function getNewsong() {
    return request({
        url: '/personalized/newsong',
        method: 'get',
        params:{
            limit:5
        }
    })
}

//获取推荐MV
// /personalized/mv
export function getPersonalizedMv() {
    return request({
        url: '/mv/first',
        method: 'get',
        params: {
            limit:10,
        }
    })
}


// 电台详情  /dj/detail?rid=336355127
//获取热门电台
//  /dj/hot
export function getDjHot() {
    return request({
        url: '/dj/hot',
        method: 'get',
        params: {
            limit: 10,
        }
    })
}

// export function getDjDetail(params) {
//     return request({
//         url: '/song/url',
//         method: 'get',
//         params
//     })
// }


//音乐列表
// /personalized/newsong
export function getNewSong() {
    return request({
        url: '/personalized/newsong',
        method: 'get',
        params: {
            limit:5
        }
    })
}

// SearchMusic组件
//发起搜索音乐 /search?keywords="海阔天空"

export function getSearchMusic(params) {
    return request({
        url: '/search',
        method: 'get',
        params
    })
}

//热搜音乐 /search/hot
export function getSearchHot() {
    return request({
        url: '/search/hot',
        method: 'get',
        
    })
}

// HighMusic组件
//获取精品歌单 /top/playlist/highquality
export function getHighQuality() {
    return request({
        url: '/top/playlist/highquality',
        method: 'get',
        params: {
            limit: 10,
        }
    })
}